// 客户经理控制器模块
import {
    initView,
    createRecord
} from '../views/managerHomeView.js';
var cw = require("../components/winLocation.js");

$(document).on("pageinit", "#mangerHome_page", controllerInit);

// 控制器初始化
function controllerInit() {
    cw.checkBrowser();
    initView();
    getRecordData();
}

// 请求数据创建记录
function getRecordData() {
    var recordData = [{
        "companyName": "江苏省南京市新区苹果专卖店",
        "transactionNum": "17",
        "userName": "田瑞丰",
        "phone": "12345678902",
        "money": "25,000.00"
    }, {
        "companyName": "江苏省苏州市新区苹果专卖店",
        "transactionNum": "14",
        "userName": "田瑞丰",
        "phone": "12345678902",
        "money": "15,000.00"
    }];

    createRecord(recordData);
}